﻿
@{
    ViewBag.Title = "ViewXindianList";
    Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="gridPanel">
    <table id="gridList"></table>
</div>
<script>
    var localdata = [];
    $(function () {
        localdata = JSON.parse(sessionStorage.getItem('XindianList'));
        gridList();
      
    });


    function gridList() {
        var $gridssyz = $("#gridList");
        $gridssyz.jqGrid({
            datatype: 'local',
            data: localdata,
            height: $(window).height()-80,
            shrinkToFit: true,   //true:按比例初始化列宽度 false:使用colModel指定的宽度
            autowidth: true,
            rownumbers: true,  //是否显示序号
            unwritten: false,
            colModel: [
                { label: 'Apply_no', name: 'Apply_no', align: 'center' },
                { name: 'Item_no', name: 'Item_no', align: 'center' },
                { name: 'PDF_path', name: 'PDF_path', align: 'center', formatter: editLink }
            ]
        });
    }

    function editLink(cellValue, options, rowdata, action) {
        var path = rowdata.PDF_path.replace("PrintPictur.aspx", "PrintPicture.aspx");
        return "<a href='" + path + "' target='view_window'>详情超链接</a>";
    }
</script>

